import request from "@/util/request";

// 获取详情页海报
export const partidetail = id => request({
  url: '/qichong-record/marketing/activity/detail',
  params: {
    id
  }
});

// 获取首页活动详情
export const homepartidetail = (space,shopId) => request({
  url: '/qichong-record/api/marketing/ad/position',
  params: {
    space,
    shopId
  }
});

// 报名活动
export const activityapply = activityUser => request({
  url: '/qichong-record/marketing/activity/user/apply',
  method: 'post',
  data: activityUser
});

// 领取优惠劵
export const activitycoupon = (activityId, activityItemId) => request({
  url: '/qichong-record/marketing/activity/task',
  method: 'post',
  params: {
    activityId,
    activityItemId
  }
});

// 获取优惠劵详情
export const getactivityapply = couponId => request({
  url: '/qichong-record/marketing/activity/receivedCoupon',
  params: {
    couponId
  }
});


// 获取活动列表
export const activityList = (queryType) => request({
  url: '/qichong-record/api/activity/page',
  params: queryType
});

// 获取邀请好友配置
export const inviteConfig = () => request({
  url: '/qichong-record/api/marketing/invite/config'
});

// 获取邀请好友记录
export const inviteLog = (current,size) => request({
  url: '/qichong-record/api/marketing/invite/log',
  params: {
	  current,
	  size
  }
});

//获取礼品卡
export const giftcardDetail = id => request({
  url: '/qichong-record/api/marketing/giftcard/detail',
  params: {
  	  id
  }
});

